"""
Elasticsearch模板
"""
OracleIndicator = {
    'index_patterns': 'oracle-indicator',
    'settings': {
        'number_of_replicas': 0,
        'number_of_shards': 1
    },
    'mappings': {
        'properties': {
            'name': {'type': 'keyword'},
            'instance_count': {'type': 'integer'},
            'table_count': {'type': 'integer'},
            'user_transaction_per_sec': {'type': 'float'},
            'physical_reads_per_sec': {'type': 'float'},
            'physical_writes_per_sec': {'type': 'float'},
            'user_rollbacks_per_sec': {'type': 'float'},
            'total_table_scans_per_txn': {'type': 'float'},
            'total_index_scans_per_txn': {'type': 'float'},
            'host_cpu_utilization_(%)': {'type': 'float'},
            'network_traffic_volume_per_sec': {'type': 'float'},
            'db_block_changes_per_sec': {'type': 'float'},
            'cpu_usage_per_sec': {'type': 'float'},
            'physical_read_total_bytes_per_sec': {'type': 'float'},
            'response_time_per_txn': {'type': 'float'},
            'current_os_load': {'type': 'float'},
            'session_count': {'type': 'float'},
            'average_active_sessions': {'type': 'float'}
        }
    }
}

MysqlIndicator = {
    'index_patterns': 'mysql-indicator',
    'settings': {
        'number_of_replicas': 0,
        'number_of_shards': 1
    },
    'mappings': {
        'properties': {
            'name': {'type': 'keyword'},
            'database_count': {'type': 'integer'},
            'table_count': {'type': 'integer'},

            'aborted_clients': {'type': 'float'},
            'aborted_connects': {'type': 'float'},
            'bytes_received': {'type': 'float'},
            'bytes_sent': {'type': 'float'},
            'connections': {'type': 'float'},
            'created_tmp_tables': {'type': 'float'},
            'innodb_buffer_pool_pages_free': {'type': 'float'},
            'innodb_buffer_pool_pages_total': {'type': 'float'},
            'innodb_num_open_files': {'type': 'float'},
            'innodb_available_undo_logs': {'type': 'float'},
            'key_blocks_unused': {'type': 'float'},
            'key_blocks_used': {'type': 'float'},
            'last_query_cost': {'type': 'float'},
            'locked_connects': {'type': 'float'},
            'max_used_connections': {'type': 'float'},
            'queries': {'type': 'float'},
            'uptime': {'type': 'float'}
        }
    }
}

PostgresIndicator = {
    'index_patterns': 'postgres-indicator',
    'settings': {
        'number_of_replicas': 0,
        'number_of_shards': 1
    },
    'mappings': {
        'properties': {
            'name': {'type': 'keyword'},
            'database_count': {'type': 'integer'},
            'table_count': {'type': 'integer'},

            'active_connector': {'type': 'float'},
            'idle_connector': {'type': 'float'},
            'checkpoints_timed': {'type': 'float'},
            'checkpoints_req': {'type': 'float'},
            'checkpoint_write_time': {'type': 'float'},
            'checkpoint_sync_time': {'type': 'float'},
            'buffers_checkpoint': {'type': 'float'},
            'buffers_clean': {'type': 'float'},
            'maxwritten_clean': {'type': 'float'},
            'buffers_backend': {'type': 'float'},
            'buffers_backend_fsync': {'type': 'float'},
            'buffers_alloc': {'type': 'float'},
            'stats_reset': {'type': 'float'}
        }
    }
}

KafkaIndicator = {
    'index_patterns': 'kafka-indicator',
    'settings': {
        'number_of_replicas': 0,
        'number_of_shards': 1
    },
    'mappings': {
        'properties': {
            'name': {'type': 'keyword'}
        }
    }
}

PrometheusIndicator = {
    'index_patterns': 'prometheus-indicator',
    'settings': {
        'number_of_replicas': 0,
        'number_of_shards': 1
    },
    'mappings': {
        'properties': {
            'name': {'type': 'keyword'}
        }
    }
}

ElasticSearchIndicator = {
    'index_patterns': 'elasticsearch-indicator',
    'settings': {
        'number_of_replicas': 0,
        'number_of_shards': 1
    },
    'mappings': {
        'properties': {
            'name': {'type': 'keyword'}
        }
    }
}
